<template>
  <!-- 后台布局 -->
  <el-container>
    <el-aside width="200px" v-show="aside">
      <div class="logo">
        <router-link to="/monitoringData">
          <img
            :src="logoImg"
            alt=""
            v-show="false"
          >
          <i
            v-show="false"
            class="iconfont icon-youyanji"
          />
          <span
            class="logo-title"
            v-if="logoTitleShow"
            v-text="logoText"
          />
        </router-link>
      </div>
      <Sidebar />
    </el-aside>
    <el-container>
      <el-header>
        <Header />
      </el-header>
      <el-main>
        <div class="line">
          <el-button type="text" icon="el-icon-d-arrow-left" @click="asideA"></el-button>
        </div>
        <transition enter-active-class="fadeInLeft">
          <router-view id="containerBackstage" />
        </transition>
      </el-main>
      <!-- <el-footer>{{Copyright}}</el-footer> -->
    </el-container>
  </el-container>
</template>

<script>
import logoImg from "@/assets/logo.png";
import Header from "../Header/index";
import Sidebar from "../NavMenu/Sidebar";
export default {
  name: "ContainerBackstage",
  data() {
    return {
      asideWidht: "220px",
      logoTitleShow: true,
      aside: true,
      logoImg: logoImg,
      logoText: this.$com.Other._title.logoText,
      Copyright: this.$com.Other._title.copyright
    };
  },
  components: { Header, Sidebar },
  methods: {
    asideA(){
      this.aside = !this.aside;
    }
  }
};
</script>

<style lang="scss" scoped>
.el-container {
  height: 100%;
}
.el-header {
  height: 60px !important;
  position: relative;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
}
.el-aside {
  background-color: #001529;
  color: #f0f2f5;
}
.el-footer {
  box-shadow: 0 -2px 4px rgba(0, 21, 41, 0.08);
  text-align: center;
  height: 30px !important;
  line-height: 30px;
  font-size: 12px;
  color: #909399;
}
.line{
  position: absolute;
  top: 0;
  left: 0;
  background: #e6e3e3;
  height: 100%;
  line-height: 50;
}
.el-main {
  overflow: auto;
  background-color: #f0f2f5;
  position: relative;
}
.logo {
  height: 60px;
  padding-left: 16px;
  line-height: 60px;
  vertical-align: middle;
  background: #002140;
  a {
    text-decoration: none;
    color: #fff;
    img {
      display: inline-block;
      width: 30px;
      margin-right: 10px;
      vertical-align: middle;
    }
  }
  .logo-title {
    font-size: 1.2rem;
    font-weight: 600;
  }
  .icon-youyanji {
    float: left;
    font-size: 24px;
    margin-right: 5px;
  }
}
</style>
